<head>
<title>Bridge Tool</title>
<%
String context_root = request.getContextPath();
%>
<link rel="stylesheet" type="text/css" href="<%=context_root%>/common/js/ext/resources/css/ext-all.css" />
<script type="text/javascript" src="<%=context_root%>/common/js/ext/adapter/ext/ext-base.js"></script>
<script type="text/javascript" src="<%=context_root%>/common/js/ext/ext-all.js"></script>
<jsp:include page="/common/initPage.jsp" />
<jsp:include page="/bridgetool/mfa-mch-incl.jsp" />
<style>
button.demo
{
	border:1px solid steelblue;
	font-size:8pt;
}
</style>
<br>
Emulator<br>
<script>
function bpopHandler(screen)
{
	if (screen.getMapKey() == "POMPM0M.SELPOP")
	{
		screen.setValue('TYPE', 'B');
		
		screen.setValue('FUND1', 'AAA1', true);
	}
	else if (screen.getMapKey() == "NYMAN0M.BROWSE2")
	{
		screen.setValue('FIELD1', 'D');
		screen.setValue('FIELD3', 'D');
		screen.setValue('FIELD5', 'D');
		screen.setValue('FIELD7', 'D');
		screen.send('ENTER');
	}
	else if (screen.getMapKey() == 'POMPD0M.POSDTL')
	{
		if (screen.getValue('PAGENO', '00') == '04')
			alert('Wow! You are on the last page');	
	}
}

function onPingLoad(store, records, options)
{
	alert("store.getCount() is " + store.getCount() + ", " +
			"records.length is " + records.length + ", " +
			"name in record[0] is " + records[0].get('name') + ", " +
			"name in store.getAt(0) is " + store.getAt(0).get('name'));
}

function onGMMLoad(store, records, options)
{
	alert("store.getCount() is " + store.getCount());
	alert("FUND & CUSIP in row() is " + store.getAt(0).get('GMM_FUND') + " & " + store.getAt(0).get('GMM_CUSIP'));
}

function populateData(argParamArray)
{
	alert("In populate--"+argParamArray);
}

function onBGMM5Click()
{
	alert("Somebody called onBGMM5Click() ...");
	var paramArray = new Array();
	paramArray.push('PA_LOT');
	paramArray.push('ISSUE_ACCOUNT_NO');

	OSAMCH.rftool.browser.show('BGMM', 'FUND=RTA3&ASSET_ID=3128MSAA8&CLC_BASIS=IFRS',null,paramArray);
}

function onOpenDlg()
{
	window.showModalDialog("<%=request.getContextPath()%>/multibasis-browse-tool.do", null, "dialogHeight:610px;dialogWidth:820px;center:yes;status:no");
}

</script>
<button class="demo" onclick="OSAMCH.rftool.emulator.show('RGTC');">RGTC</button><br>
<button class="demo" onclick="OSAMCH.rftool.emulator.show('BPOP', { 'POMPM0M.SELPOP' : { 'TYPE' : 'B', 'FUND1' : 'AAA1' }, 'NYMAN0M.BROWSE2' : { 'FIELD1' : 'D', 'FIELD3' : 'D' } });">BPOP</button><br>
<button class="demo" onclick="OSAMCH.rftool.emulator.show('BPOP', bpopHandler);">BPOP (handler)</button><br>
<button class="demo" onclick="OSAMCH.rftool.emulator.show('REDB');">REDB</button><br>
<button class="demo" onclick="OSAMCH.rftool.emulator.show('REDC', { 'RKMHO0M.CXLSCR' : { 'TRADID' : 'MYTRADEID' } });">REDC</button><br>

<br>
Browse:<br>
<button class="demo" onclick="OSAMCH.rftool.show();">SHOW THE TOOL</button><br>

<br>
IDF Call:<br>
<button class="demo" onclick="OSAMCH.rftool.browser.createStore('__request=102', ['name', 'hits', 'start_time' ], onPingLoad)">PING</button><br>
<button class="demo" onclick="OSAMCH.rftool.browser.createStore('__request=510001&STATUS=1&FUND=B21A&__fields=GMM.FUND,GMM.CUSIP', ['GMM_FUND', 'GMM_CUSIP'], onGMMLoad)">BGMM</button><br><br>

<br>
<button class="demo" onclick="OSAMCH.rftool.browser.show(null, 'STATUS=1&FUND=GPG1&CUSIP=003453AP2&CLC_BASIS=IFRS')">SHOW THE TOOL FOR RESEARCH</button><br>
<button class="demo" onclick="OSAMCH.rftool.browser.show('BGMM', 'STATUS=1&FUND=GPG1&CUSIP=003453AP2')">BGMM (4.1)</button><br>
<button class="demo" onclick="onBGMM5Click()">BGMM (5.0)</button><br>
<button class="demo" onclick="OSAMCH.rftool.browser.show('BCAR', 'CUSIP=459745BK0')">BCAR</button><br>
<button class="demo" onclick="OSAMCH.rftool.browser.show('BTRD', 'FUND=GPG1&CUSIP=459200101')">BTRD</button><br>
<button class="demo" onclick="OSAMCH.rftool.browser.show('CTDA', 'FUND=KDN1&CUSIP=4RTW00006')">CTDA</button><br>
<button class="demo" onclick="OSAMCH.rftool.browser.show('BRFD', 'FUND=JIMD&CLC_BASIS=IFRS')">BRFD</button><br>
<button class="demo" onclick="OSAMCH.rftool.browser.show('BRKP', 'FUND=CAC0&ASSET_ID=7139909C5&CLC_BASIS=IFRS')">BRKP</button><br>
<button class="demo" onclick="OSAMCH.rftool.browser.show('BGMM', 'FUND=GPG2&CUSIP=003453AP2,FUND=GPG1&CUSIP=003453AP2,FUND=GPG1&CUSIP=459200110,FUND=GPG1&CUSIP=003453AP2')">BGMM (4.1) Multi Values</button><br>
<button class="demo" onclick="OSAMCH.rftool.browser.show('BGMM', 'FUND=INIT&ASSET_ID=99&CLC_BASIS=IFRS')">BGMM (5) Multi Values</button><br>
<button class="demo" onclick="OSAMCH.rftool.browser.show('BCAR', 'CUSIP=459745BK0,CUSIP=459200101')">BCAR Multi Values</button><br>
<button class="demo" onclick="OSAMCH.rftool.browser.show('BCAR')">BCAR without args</button><br>
<button class="demo" onclick="onOpenDlg()">TEST</button>

<br>
<br>
<button class="demo" onclick="OSAMCH.rftool.LaunchInputScreen.show('BGMM5')">BGMM-MBB Input Screen</button><br>
<button class="demo" onclick="OSAMCH.rftool.LaunchInputScreen.show('BRFD')">BRFD-MBB Input Screen</button><br>
<button class="demo" onclick="OSAMCH.rftool.LaunchInputScreen.show('BRKP')">BRKP-MBB Input Screen</button><br>
<button class="demo" onclick="OSAMCH.rftool.LaunchInputScreen.show('SOMEJUNK')">JUNK-MBB Input Screen</button><br>
